<?xml version='1.0' encoding='UTF-8' ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.prime.com.tr/ui">

    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link href="/Gepro/resources/css/default.css" rel="stylesheet" type="text/css" />
        <link href="/Gepro/resources/css/cssLayout.css" rel="stylesheet" type="text/css" />
        <link href="/Gepro/resources/css/alteracoesPrime.css" rel="stylesheet" type="text/css" />

        <title>GEPRO</title>
    </h:head>
    <h:body>
        <p:layout fullPage="true">
            <p:layoutUnit position="top" height="120" 
                          header="" resizable="false" closable="false" collapsible="false">
                <h:outputText value="GEPRO" />
                <img class="banner" src="/Gepro/img/banner.jpg"/>
            </p:layoutUnit>
            <p:layoutUnit position="left" width="200" header="Menu Principal" resizable="false" closable="false" collapsible="true" >
                <ui:insert name="menu">
                    <h:form>
                        <p:accordionPanel autoHeight="false">
                            <p:tab title="Projeto">
                                <h:panelGrid columns="1" columnClasses="menu">
                                    <h:outputLink value="/Gepro/pages/CLIENTE/cad_LProjeto.xhtml" >
                                        <h:outputText value="Projetos que faço parte" style="text-align: center"/>
                                    </h:outputLink>
                                </h:panelGrid>
                            </p:tab>
                            <p:tab title="Projeto">
                                <h:panelGrid columns="1" columnClasses="menu">
                                    <h:outputLink value="/Gepro/pages/CLIENTE/cad_usuario.xhtml" >
                                        <h:outputText value="Atualizar Cadastro" style="text-align: center"/>
                                    </h:outputLink>
                                </h:panelGrid>
                            </p:tab>
                        </p:accordionPanel>
                            <h:form>  

                                <p:growl id="messages" />  

                                <h:panelGrid columns="1" cellpadding="5">  
                                    <h:outputText id="msg" value=""/>  

                                    <p:commandButton value="Sair" onclick="confirmation.show()" type="button" style="color: red; "/>  
                                </h:panelGrid>  

                            </h:form>   
                    </h:form>
                </ui:insert>
            </p:layoutUnit>            
            <p:layoutUnit position="center" scrollable="true">
                <ui:insert name="conteudo"/>
                <h:form>

                    <p:confirmDialog message="Deseja mesmo sair do Gepro?"  
                                     showEffect="bounce" hideEffect="explode"  
                                     header="Sair do Gepro" severity="alert" widgetVar="confirmation">  

                        <p:commandButton value="Sim" update="messages" oncomplete="confirmation.hide()"  
                                         action="#{usuario.logout}" />  
                        <p:commandButton value="Não" onclick="confirmation.hide()" type="button" />   

                    </p:confirmDialog>  

                </h:form>
            </p:layoutUnit>
            <p:layoutUnit position="bottom" height="75" header="" resizable="false" closable="false" collapsible="true">
                <h:outputText value="Desenvolvido por TADS20091" />
            </p:layoutUnit>
        </p:layout>
        <h:form>
            <p:idleMonitor timeout="1200000" onidle="idle.show();"/>
            <p:dialog widgetVar="idle" modal="true" width="400" closable="false"
                      resizable="false" header="Sua sessão expirou">
                <h:outputText value="Sua sessão expirou :("/> <br/>
                <h:outputText value="Click no botão para fazer login novamente"/>
                <p:commandButton value="Logar" action="#{usuario.logout}" />          
            </p:dialog>
        </h:form>
    </h:body>
</html>
